﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace Dmo13_1_1
{
    internal class Program
    {
        //这里代码未生效
        [DllImport("Demo13-1-2.dll", CallingConvention = CallingConvention.Cdecl,CharSet = CharSet.Unicode)]
        public extern static int InitChars(char[] c);
        static void Main(string[] args)
        {
                char[] a = { 'a', 'b', 'c' };
                var len = InitChars(a);
                Debugger.Break();
                Console.WriteLine("长度为" + len);
                Console.ReadLine();
          
        }
    }
}
